package SimpleFactory;

public class Factory {
    public static Product newProduct(String arg) {
        if ("A".equals(arg)) {
            return new ProdcutImplA();
        } else if ("B".equals(arg)) {
            return new ProductImplB();
        } else {
            return null;
        }
    }
}
